package StringHomeWork;
//增 append（） 改replace（） 删delete() 插入insert()
public class StringBuildDemo1 {
    public static void main(String[] args) {
        String str="我和我的祖国,";
        StringBuilder builder=new StringBuilder(str);
        builder.append("一刻也不能分离");
        System.out.println(builder);

        builder.replace(7,15,"永远都要在一起");
        System.out.println(builder);

        builder.insert(7,"1234567");
        System.out.println(builder);

        builder.delete(7,15);
        System.out.println(builder);
    }
}
